package cn.zebra.dev.admin.module.role.entity;

import cn.zebra.dev.base.module.role.entity.BaseRole;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 后台角色
 *
 * @author runnable
 * @date 2019-09-07 17:01:00
 */
@TableName("admin_role")
@Getter
@Setter
public class AdminRoleEntity implements BaseRole, Serializable {
    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.AUTO)
    @ApiModelProperty(hidden = true)
    private Long id;

    @ApiModelProperty("角色名称")
    @NotBlank(message = "角色名称不能为空")
    private String roleName;

    @ApiModelProperty(hidden = true)
    private Boolean deleteFlag;

    private Long createId;

    private LocalDateTime createTime;

    @ApiModelProperty(hidden = true)
    private Long updateId;

    @ApiModelProperty(hidden = true)
    private LocalDateTime updateTime;

    @ApiModelProperty("备注")
    private String remark;

    @TableField(exist = false)
    @ApiModelProperty(value = "菜单id", hidden = true)
    private List<Long> menuIdList;
}
